# 给定的dict, K是姓名,V是性别(0男,1女),格式如下:
# {'name1':0,'name2':0}
# 统计男生和女生人数,返回字典sex,格式如下:
# {'男生':10,'女生':5}
# 提示:
#遍历字典:  for k,v in dict.items()

xsh={'zjt':0,'zl':0,'wbm':0,'gdd':1,'wll':1,'name':0,'name2':1}
def students(xsh):
    stus={}
    nan=0
    nv=0
    for k,v in dict.items(xsh):
    # for k,v in xsh.items():
        if v==0:
            nan+=1
        elif v==1:
            nv+=1
    stus['男生']=nan
    stus['女生']=nv
    return stus

print(students(xsh))